package edu.spex.yjl.week05;

public class Animal{
    String name;
    String gender;
    int age;

    public Animal(){

    }
    public Animal(String name,String gender,int age){
        this.name = name;
        this.gender = gender;
        this.age = age;
    }
    public void born(){
        System.out.println("Born");
    }
    public void eat(){
        System.out.println("eat");
    }
    public void reproduction(){
        System.out.println("reproduction");
    }
}
class Mammal extends Animal{
    public Mammal(){

    }
    public Mammal(String name,String gender,int age){
        super(name,gender,age);
    }

    public void born_vivipary(){
        System.out.println("Born_vivipary");
    }
    public void eat_suck(){
        System.out.println("eat suck");
    }
    public void eat_food(){
        System.out.println("eat food");
    }
}
class Dog extends Mammal{
    String breed;

    public Dog(){

    }
    public Dog(String name,String gender,int age,String breed){
        super(name,gender,age);
        this.breed = breed;
    }
    public String getName(){
        return this.name;
    }
    public void cry(){
        System.out.println("cry");
    }
}
class Test{
    public static void main(String [] args){
        Animal anmial = new Animal("1","2",3);
        Mammal mammal = new Mammal("9","8",7);
        Dog dog = new Dog("4","5",6,"0");

        dog.born_vivipary();
        dog.eat_suck();
        dog.eat_food();
        dog.reproduction();
        dog.cry();
    }
}
